The present invention relates to a picture processing device and a method thereof. More particularly, this invention relates to a picture processing device and a method thereof which enable characters to move smoothly in response to a ball in video games which imitate ball games such as baseball or soccer.
With the progress of computer technology, video game machines (picture processing devices) utilizing computer graphic technique have come to be widely used. Particularly, popularity of video game machines which imitate ball games such as baseball or soccer has been firmly established, and a considerable amount of this type of video game machines have been devised.
However, conventional video game machines have many problems as described below.
First, it is difficult to display a fielder""s ball-catching movement smoothly.
A conventional video game machine generally comprises: a display which displays batters, fielders and other characters; an operation stick which operates batters, fielders and other characters on a screen; and a picture processing circuit which displays a desirable image on the screen in accordance with the operation of the operation stick. Such a video game machine is provided with a plane picture called xe2x80x9cspritexe2x80x9d for each movement posture of each fielder, and the sprite is displayed according to the progress of a game on the screen. A virtual area called the xe2x80x9ccollision areaxe2x80x9d for determination of collision is provided in the vicinity of a fielder. When a ball enters the collision area, the fielder moves to catch the ball.
For example, when a game player operates the stick, the fielder on the screen chases the batted ball in accordance with the operation of the stick. The collision area, then, also moves together with the fielder. If the fielder catches up with the ball and the ball enters the collision area near the fielder, the fielder moves to catch the ball. Namely, the video game machine determines that the ball in the screen has reached close to the fielder, and displays the sprite which shows the ball-catching movement. Therefore, the fielder never begins the ball-catching movement unless the ball enters the collision area on the screen.
However, since the time spent after the ball enters the collision area until the fielder catches the ball is very short, the fielder needs to perform the ball-catching movement in a very short period of time after the ball enters the collision area. Accordingly, the fielder""s ball-catching movement turns out to be awkward and it is then difficult to provide a realistic game. As a means for solving this problem, it is possible to enlarge the collision area near the fielder. In other words, it is possible to lengthen the time spent after the ball enters the collision area until the fielder catches the ball. However, if the collision area is enlarged, a problem arises that the fielder begins moving to catch a ball even when the ball is too far away to catch.
Secondarily, a considerable amount of operation is required for a processing which determines the collision between a batted ball and a fence, which subsequently hinders high speed processing.
When a batted ball flies beyond an outfielder in a video game machine, whether or not a collision will take place between the batted ball and the fence is determined. For example, when the fence is displayed with a plurality of polygons, it is determined whether or not coordinates of the ball are located on the polygons. If it is determined that the ball will collide with the polygons which compose the fence, a processing for bounding the ball back from the fence is performed.
Namely, the conventional baseball game determines whether the ball collides with the fence by confirming whether coordinates of the ball are positioned on the polygons which compose the fence. However, since coordinates of the ball and the polygons are expressed by three-dimensional data, a considerable amount of processing is required to determine the position relationship between the ball and the polygons. Therefore, there existed a problem in that a processing speed of the entire game was lowered.
Thirdly, it is difficult to accurately perform a hidden face treatment of polygons which are located very close to each other as in the case of a player""s number and a uniform.
In video games such as baseball and soccer, it is desirable to give different player""s numbers for different players in order to heighten the realistic excitement of the game. However, if different pictures are prepared for uniforms of different players, an enormous amount of display data would be required. Therefore, a method of preparing a picture of the uniform and a picture of the player""s number separately and superimposing the picture of the player""s number on the picture of the uniform is taken.
However, when the player""s number and the uniform are displayed by means of polygons, the following problems occur. When the polygons overlap one another, a treatment is performed not to display the overlapped portion of the polygons, which is positioned at the back of the other overlapped portion on the screen (xe2x80x9chidden face treatmentxe2x80x9d). In order to perform this hidden face treatment, the following method (xe2x80x9cZ-sorting methodxe2x80x9d) is suggested: priority of respective polygons is determined in accordance with the dimensions of depth-directional coordinates (z-coordinate values) of the polygons, and the polygons are displayed in accordance with the priority. Namely, in the Z-sorting method, a representative point is decided for each polygon and the priority of the polygons is determined in accordance with the dimensions of z-coordinate values of the representative points.
As described above, one representative point must be decided for each polygon when the Z-sorting method is employed. In order to decide a representative point, there are: a method of determining the most front vertex among vertexes of a polygon as its representative point; a method of determining the most back vertex among vertexes of a polygon as its representative point; and a method of determining the center of gravity of a polygon as its representative point. However, whichever method is taken, if two polygons, such as those of a player""s number and a uniform, are located very close to each other, in other words, if two sets of z-coordinate values are very close, it is difficult to accurately determine the priority of the polygons. Accordingly, a problematic hidden face treatment is sometimes performed: for example, a player""s number is hidden by a uniform.
In order to avoid such a problem, it is possible to give a higher priority to a player""s number than to a uniform and to always superimpose the player""s number on the uniform. However, this method could cause another problem that when a fielder faces front so that his back is not displayed, his number is still displayed. Accordingly, it has been difficult to accurately apply the hidden face treatment to polygons which are located very close to each other.
The present invention is devised in order to overcome the above-described problems. The first object of this invention is to provide a picture processing device and a method thereof which enable a smooth ball-catching movement.
The second object of this invention is to provide a picture processing device and a method thereof which make it possible to determine a collision between a batted ball and a fence by means of a simple operation.
The third object of this invention is to provide a picture processing device and a method thereof which make it possible to accurately apply the hidden face treatment to polygons which are located very close to each other such as a player""s number and his uniform.
The invention described in claim 1 is aimed at achieving the aforementioned first object and is a picture processing device for changing, a shape of a second picture when a first picture collides with the second picture. The picture processing device comprises: virtual area producing means for producing a virtual area at a position away from a position of the first picture, wherein a distance between the virtual area position and the first picture position is determined based on a distance in which the first picture moves in a predetermined time; determining means for determining whether the second picture is located in the virtual area; and picture changing means for changing the shape of the second picture when the second picture is located in the virtual area.
The invention described in claim 2 is aimed at achieving the aforementioned first object and is a picture processing device according to claim 1, comprising position determining means for determining a moving speed and the position of the first picture, wherein the virtual area producing means change a shape of the virtual area based on determination results of the position determining means.
The invention described in claim 3 is aimed at achieving the aforementioned first object and is a picture processing device according to claim 2, wherein the above-mentioned virtual area producing means is aimed at achieving the aforementioned first object and reduces an area of the virtual area in accordance with a decrease in a speed of the first picture.
The invention described in claim 4 is aimed at achieving the aforementioned first object and is a picture processing device according to any one of claims 1 through 3, wherein the virtual area has a major axis along a line perpendicular a direction in which the first picture.
The invention described in claim 5 is aimed at achieving the aforementioned first object and is a picture processing device according to claim 1, wherein the picture changing means produces the second picture in a shape corresponding to the position of the first picture in the virtual area.
The invention described in claim 6 is aimed at achieving the aforementioned first object and is a picture processing device according to claim 1, wherein the picture changing means produces the second picture in a shape corresponding to a height of the first picture from a standard plane picture.
The invention described in claim 7 is aimed at achieving the aforementioned first object and is a picture processing device according to any one of claims 1, 2, 3, 5, or 6, wherein the first picture represents a baseball ball, the second picture represents a baseball fielder, and the picture changing means gradually changes the posture of a fielder according to a ball-catching movement.
The invention described in claim 8 is aimed at achieving the aforementioned third object and is a picture processing device, comprising: coordinate converting means for projecting a plurality of polygons represented in a three-dimensional coordinate system on a two-dimensional coordinate system; and hidden face treatment means for determining the display order of the plurality of polygons projected on the two-dimensional coordinate system on the basis of dimensions of the depth-directional coordinate values of the three-dimensional coordinate system in a display screen and for displaying the polygons with priority in accordance with the determined display order. The hidden face treatment means determines the display order of a polygon group consisting of the plurality of polygons, of which description order is predetermined, on the basis of the depth-directional coordinate values of one polygon composing the polygon group, and respective polygons composing the polygon group are displayed with priority in accordance with the description order only when it is decided to display the polygon group.
The invention described in claim 9 is aimed at achieving the aforementioned third object and is a picture processing device according to claim 8, wherein the hidden face treatment means determines the display order of the polygon group on the basis of the depth-directional coordinate values of a polygon having the highest description order.
The invention described in claim 10 is aimed at achieving the aforementioned third object and is a picture processing device according to claim 8, wherein the above-mentioned one polygon represents a player""s number and the other polygon represents a uniform.
The invention described in claim 11 is aimed at achieving the aforementioned second object and is a picture processing device for determining a collision between a curved-face picture having a radius xe2x80x9cRxe2x80x9d from its center point and the first picture, wherein it is determined that the first picture collides with the curved-face picture when distance xe2x80x9crxe2x80x9d calculated from the center point and the first picture reaches distance xe2x80x9cR.xe2x80x9d
The invention described in claim 12 is aimed at achieving the aforementioned second object and is a picture processing device according to claim 11, wherein the curved-face picture represents a baseball fence and the first picture represents a ball.
The invention described in claim 13 is aimed at achieving the aforementioned first object and is a picture processing method for changing a shape of a second picture when a first picture collides with the second picture, the method comprising: producing a virtual area at a position away from a position of the first picture, wherein a distance between the virtual area position and the first picture position is determined based on a first picture moves in a predetermined time; the step of determining whether the second picture is located in the virtual area; and the step of changing the shape of the second picture when the second picture is located in the virtual area.
The invention described in claim 14 is aimed at achieving the aforementioned first object and is a picture processing method according to claim 13, further comprising determining a moving speed and the position of the first picture and changing the shape of the virtual area based on the determined moving speed and position.
The invention described in claim 15 is aimed at achieving the aforementioned third object and is a picture processing method, comprising: the step of projecting a plurality of polygons represented in a three-dimensional coordinate system on a two-dimensional coordinate system; and the step of determining the display order of the plurality of polygons projected on the two-dimensional coordinate system on the basis of dimensions of the depth-directional coordinate values of the three-dimensional coordinate system in a display screen and then displaying the polygons with priority in accordance with the Determined display order. The display order of a polygon group consisting of the plurality of polygons, of which description order is predetermined, is determined on the basis of the depth-directional coordinate values of one polygon composing the polygon group, and respective polygons composing the polygon group are displayed with priority in accordance with the description order only when it is decided to display the polygon group.
The invention described in claim 16 is aimed at achieving the aforementioned second object and is a picture processing method for determining a collision between a curved-face picture having a radius xe2x80x9cRxe2x80x9d from its center point and a first picture, wherein it is determined that the first picture collides with the curved-face picture when distance xe2x80x9crxe2x80x9d calculated between the center point and the first picture reaches distance xe2x80x9cR.xe2x80x9d
According to the invention described in claim 1, the virtual area producing means produces a virtual area at a position away from a position of the first picture, wherein a distance between the virtual area position and the first picture position is determined based on a first picture moves in a predetermined time. Namely, the virtual area is produced at a position away from the first picture for a predetermined distance in a moving direction of the first picture. The determining means determines whether the second picture is located in the virtual area. When the second picture is located in the virtual area, the picture changing means changes the shape of the second picture.
For example, when the second picture representing a fielder enters the virtual area, the posture of the fielder gradually changes from a waiting posture to a ball-catching posture. Then, when the first picture representing a ball reaches the fielder, the posture of the fielder turns to a ball-catching posture. According to this invention, since the virtual area for collision determination is located away from the first picture, it is possible to lengthen the time required after the second picture enters the virtual area until the first picture collides with the second picture. Accordingly, if this invention is applied to a baseball game, it is possible to obtain sufficient time to change the fielder""s posture to catch a ball, thereby enabling a smooth ball-catching movement.
According to the invention described in claim 2, the position determining means determines the moving speed and the position of the first picture and the virtual area producing means changes the shape of the virtual area on the basis of the determination results of the position determining means. For example, according to the invention described in claim 3, when the speed of the first picture is low, the virtual area producing means reduces the area of the virtual area. When the speed of the ball (first picture) is low, it is possible to avoid any inconvenience such as the fielder (second picture) beginning the ball-catching movement at a position away from the ball. Namely, it is possible to solve the problem that the fielder jumps at and catches the ball which almost stops.
According to the invention described in claim 4, the virtual area has a major axis along a line perpendicular to a direction in which the first picture moves. Therefore, the fielder (second picture) is capable of catching the ball (first picture) which comes flying to the right or left of the fielder""s position.
According to the invention described in claim 5, the picture changing means produces the second picture in the shape corresponding to the position of the first picture in the virtual area. For example, when the fielder (second picture) is located in the middle of the virtual area, the ball (first picture) comes flying toward the front of the fielder and, therefore, the fielder is displayed in the forward-facing posture to catch the ball. On the other hand, when the fielder is located at the end of the virtual area, the ball comes flying toward the side of the fielder and, therefore, the fielder is displayed in the side-facing posture to catch the ball. As described above, it is possible to reproduce the ball-catching movement similar to a real movement by changing the fielder""s posture according to the position of the fielder in the virtual area.
According to the invention described in claim 6, the picture changing means produces the second picture in the shape corresponding to the height of the first picture from a standard plane picture. For example, when the position of the ball (first picture) is high from a ground (standard plane picture), the fielder is displayed to catch a fly. When the position of the ball is low, the fielder is displayed to catch a grounder. As described above, it is possible to reproduce the ball-catching movement similar to a real movement by changing the fielder""s ball-catching movement according to the height of the ball.
According to the invention described in claim 7, the first picture represents a baseball, the second picture represents a baseball fielder, and the picture changing means gradually changes the posture of the fielder according to the ball-catching movement. Therefore, it is possible to realize a smooth ball-catching movement.
According to the invention described in claim 8, the coordinate converting means projects a plurality of polygons represented in a three-dimensional coordinate system on a two-dimensional coordinate system. The hidden face treatment means determines the display order of the plurality of polygons projected on the two-dimensional coordinate system on the basis of dimensions of the depth-directional coordinate values in a display screen and displays the polygons with priority in accordance with the determined display order. The hidden face treatment means determines the display order of a polygon group consisting of the plurality of polygons, of which description order is predetermined, on the basis of the depth-directional coordinate values of one polygon composing the polygon group. The hidden face treatment means display the respective polygons composing the polygon group with priority in accordance with the description order only when it is decided to display the polygon group.
In other words, in the same polygon group, comparison of the depth-directional coordinate values of respective polygons (for example, by the Z-sorting method) is not conducted, but the polygons are displayed in the predetermined description order. Therefore, it is possible to perform the hidden face treatment accurately even when two polygons are located very close to each other. As shown in the invention described in claim 10, a polygon representing the uniform and a polygon representing the player""s number can be displayed accurately.
According to the invention described in claim 9, the hidden face treatment means decides the display order of the polygon group on the basis of the depth-directional coordinate values of a polygon having the highest description order. Therefore, since the present invention can decide the display order of polygon groups in the same manner as that of other polygons, it is possible to secure the compatibility between the conventional hidden face treatment, for example, by the Z-sorting method and the hidden face treatment of this invention.
According to the invention described in claim 11, a curved-face picture having a radius xe2x80x9cRxe2x80x9d from its center point is assumed and the distance xe2x80x9crxe2x80x9d between the first picture and the center point is calculated. The picture processing device then determines that the first picture collides with the curved-face picture when distance xe2x80x9crxe2x80x9d reaches distance xe2x80x9cR.xe2x80x9d For example, in the invention described in claim 11, when the curved-face picture represents a baseball fence and the first picture represents a ball, it is possible to easily determine a collision between the ball and the fence by comparing distance xe2x80x9cRxe2x80x9d with distance xe2x80x9cr.xe2x80x9d
According to the invention described in claim 13, a virtual area is produced at a position away from a position of the first picture, wherein a distance between the virtual area position and the first picture position is determined based on a distance in which the first picture moves in a predetermined time. When it is determined whether the second picture is located in the virtual area, and if it is determined that the second picture is located in the virtual area, the shape of the second picture is changed. For example, according to this invention, since the virtual area for collision determination is located away from the first picture, it is possible to lengthen the time spent after the second picture enters the virtual area until the first picture and the second picture collide with each other. Accordingly, when this invention is applied to a baseball game, it is possible to secure sufficient time to change a fielder""s ball-catching posture and to realize a smooth ball-catching movement.
According to the invention described in claim 14, the moving speed and position of the first picture are determined and the shape of the virtual area is changed according to the determined moving speed and position.
According to the invention described in claim 15, the display order of the plurality of polygons projected on the two-dimensional coordinate system is decided on the basis of dimensions of depth-directional coordinate values in the display screen, and the polygons are displayed with priority in accordance with the determined display order. Also, the display order of a polygon group consisting of a plurality of polygons, of which description order is predetermined, is decided on the basis of depth-directional coordinate values of one polygon composing the polygon group. Only when it is decided to display the polygon group, the respective polygons composing the polygon group are displayed with priority in accordance with the description order.
In other words, in the same polygon group, comparison of the depth-directional coordinate values of respective polygons (for example, by the Z-sorting method) is not conducted, but the polygons are displayed in the predetermined description order. Therefore, it is possible to perform the hidden face treatment accurately even when two polygons are located very close to each other.
According to the invention described in claim 16, a curved-face picture having a radius xe2x80x9cRxe2x80x9d from its center point is assumed and the distance xe2x80x9crxe2x80x9d between the first picture and the center point is calculated. When distance xe2x80x9crxe2x80x9d reaches distance xe2x80x9cR,xe2x80x9d it is determined that the first picture collides with the curved-face picture. When the curved-face picture represents a baseball fence and the first picture represents a ball, for example, it is possible to easily determine whether or not the ball collides with the fence, by comparing distance xe2x80x9cRxe2x80x9d with distance xe2x80x9cr.xe2x80x9d
An invention described in claim 17 is a computer-readable memory medium for storing the order in which a picture processing device changes a shape of a second picture when a first picture collides with the second picture. The computer-readable memory medium includes instructions for causing a computer to perform several operations. First the computer produces a virtual area at a position away from a position of the first picture. A distance between the virtual area position and the first picture position is determined based on a distance in which the first picture moves in a predetermined time. Second, the computer determines whether the second picture is located in the virtual area. Third, the computer changes the shape of the second picture when the second picture is located in the virtual area. Examples of such a memory medium include floppy disks, magnetic tapes, photomagnetic disks, CD-ROM, DVD, ROM cartridges, RAM cartridges with battery back-up, and nonvolatile RAM cartridges. The memory medium stores information (mainly digital data and programs) by some physical means and is capable of having a processing device such as computers and private processors perform a certain function.